{template file="member/header.html"/}
<div class="layui-tab layui-tab-brief">
    <ul class="layui-tab-title">
        <li class="layui-this">订单记录</li>
    </ul>
    <div class="layui-tab-content" style="padding: 20px 0;">
        <div class="layui-tab-item layui-show">
        	<table class="layui-hide" id="currentTable" lay-filter="currentTable"></table>
        </div>
    </div>
</div>
{template file="member/layui.html"/}
<script>
layui.use(['yznTable','form'], function() {
    var yznTable = layui.yznTable,
        $ = layui.$,
        form = layui.form;


    var init = {
        table_elem: '#currentTable',
        table_render_id: 'currentTable',
    };

    yznTable.render({
        init: init,
        toolbar: ['refresh'],
        url: '{:url("order")}',
        search:false,
        cols: [
            [
                { field: 'id', width: 60, title: 'ID' },
                { field: 'trade_sn',width: 250,align: "left", title: '订单ID' },
                { field: 'title', title: '标题' },
                { field: 'catid', width: 80,title: '栏目id' },
                { field: 'contentid', width: 80,title: '内容id' },
                { field: 'pay_price', width: 120, title: '支付金额', templet: '<div>{{ d.pay_price }} {{#  if(d.type==1){ }} 元 {{#  } else { }} 点 {{#  } }}</div>' },
                { field: 'pay_type', width: 100, title: '支付类型'},
                { field: 'pay_time', width: 180, title: '支付时间',search: 'range',templet: yznTable.formatter.datetime },
                { field: 'create_time', width: 180, title: '创建时间' , search: 'range'},
                { field: 'status', width: 90, title: '订单状态',templet: yznTable.formatter.label,selectList:{'succ':'成功','failed':'失败','error':'异常','cancel':'取消','unpay':'待支付'},custom:{'succ':"green",'failed':"red",'error':"orange",'unpay':"red"}},
            ]
        ],
        page: {}
    });

    yznTable.bindevent();
});
</script>
{template file="member/footer.html"/}